﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.TradeChannel.Configure
{
    /// <summary>
    /// 交易通道配置
    /// 各种交易的参数配置，从字典中加载相应参数
    /// </summary>
    public interface ITradeChannelConfigure
    {
        ITradeChannelConfigureInfo ConfigureInfo { get; set; }

        /// <summary>
        /// 获取收款通Url
        /// </summary>
        string PayNotifyUrl { get; }

        /// <summary>
        /// 获取支付成功返回地址
        /// </summary>
        string PayReturnUrl { get; }

        /// <summary>
        /// 获取支付Wap成功返回地址
        /// </summary>
        string PayWapReturnUrl { get; }

        /// <summary>
        /// 获取退款通知Url
        /// </summary>
        string RefundNotifyUrl { get; }


        void SaveCheck(ITradeChannelConfigureInfo configureInfo);

        /// <summary>
        /// 获取支付的错误消息
        /// </summary>
        /// <param name="code">代码</param>
        /// <returns></returns>
        string GetPayErrorMessage(string code);

        /// <summary>
        /// 获取退款的错误消息
        /// </summary>
        /// <param name="code">代码</param>
        /// <returns></returns>
        string GetRefundErrorMessage(string code);

        /// <summary>
        /// 获取订单查询的错误消息
        /// </summary>
        /// <param name="code">代码</param>
        /// <returns></returns>
        string GetOrderQueryErrorMessage(string code);

        /// <summary>
        /// 获取转账的错误消息
        /// </summary>
        /// <param name="code">代码</param>
        /// <returns></returns>
       // string GetMoveErrorMessage(string code);

        /// <summary>
        /// 获取编码
        /// </summary>
        Encoding Encoding { get; }


    }
}
